package com.ruoyi.fantasy.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.fantasy.mapper.FantasyCabinetsMapper;
import com.huanzhidadi.fantasy.bean.domain.FantasyCabinet;
import com.ruoyi.fantasy.service.IFantasyCabinetsService;
import com.ruoyi.common.core.text.Convert;

/**
 * 柜子 服务层实现
 * 
 * @author wanghui
 * @date 2019-07-05
 */
@Service
public class FantasyCabinetsServiceImpl implements IFantasyCabinetsService 
{
	@Autowired
	private FantasyCabinetsMapper fantasyCabinetsMapper;

	/**
     * 查询柜子信息
     * 
     * @param id 柜子ID
     * @return 柜子信息
     */
    @Override
	public FantasyCabinet selectFantasyCabinetsById(Integer id)
	{
	    return fantasyCabinetsMapper.selectFantasyCabinetsById(id);
	}
	
	/**
     * 查询柜子列表
     * 
     * @param fantasyCabinets 柜子信息
     * @return 柜子集合
     */
	@Override
	public List<FantasyCabinet> selectFantasyCabinetsList(FantasyCabinet fantasyCabinets)
	{
	    return fantasyCabinetsMapper.selectFantasyCabinetsList(fantasyCabinets);
	}
	
    /**
     * 新增柜子
     * 
     * @param fantasyCabinets 柜子信息
     * @return 结果
     */
	@Override
	public int insertFantasyCabinets(FantasyCabinet fantasyCabinets)
	{
	    return fantasyCabinetsMapper.insertFantasyCabinets(fantasyCabinets);
	}
	
	/**
     * 修改柜子
     * 
     * @param fantasyCabinets 柜子信息
     * @return 结果
     */
	@Override
	public int updateFantasyCabinets(FantasyCabinet fantasyCabinets)
	{
	    return fantasyCabinetsMapper.updateFantasyCabinets(fantasyCabinets);
	}

	/**
     * 删除柜子对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deleteFantasyCabinetsByIds(String ids)
	{
		return fantasyCabinetsMapper.deleteFantasyCabinetsByIds(Convert.toStrArray(ids));
	}
	
}
